-- GENERATED SPELL FOR [Defias Wizard] --


function spell0_4418(pUnit, Event) --@Chains of Ice,n/a--
pUnit:FullCastSpellOnTarget(113,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4418', 16500, 1)
end

function spell1_4418(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(9053,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4418', 3000, 1)
end

function spell2_4418(pUnit, Event) --@Quick Flame Ward,n/a--
pUnit:FullCastSpellOnTarget(4979,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4418', 11500, 1)
end

function Sorts_4418(pUnit, Event)
local choix_sorts_4418 = math.random(0, 2)
if choix_sorts_4418 == 0 then
pUnit:RegisterEvent('spell0_4418', 1, 1)
end
if choix_sorts_4418 == 1 then
pUnit:RegisterEvent('spell1_4418', 1, 1)
end
if choix_sorts_4418 == 2 then
pUnit:RegisterEvent('spell2_4418', 1, 1)
end
end

function mob4418_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_4418', math.random(1500, 3000), 1)
end

function mob4418_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4418_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4418_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(4418, 1, 'mob4418_Action')
RegisterUnitEvent(4418, 2, 'mob4418_Leave')
RegisterUnitEvent(4418, 3, 'mob4418_Kill')
RegisterUnitEvent(4418, 4, 'mob4418_Die')
